//
//  CustomerServiceTableViewCell.m
//  UGoods
//
//  Created by dllo on 16/1/21.
//  Copyright © 2016年 蓝鸥科技.李贺. All rights reserved.
//

#import "CustomerServiceTableViewCell.h"
#import "BaseView.h"
#import "BaseLabel.h"
#import "ConstantsDefine.h"
@interface CustomerServiceTableViewCell ()

@property (nonatomic, retain) BaseView *backView; /**< 背景 */
@property (nonatomic, retain) BaseLabel *label1;
@property (nonatomic, retain) BaseLabel *label2;
@property (nonatomic, retain) BaseLabel *label3;
@property (nonatomic, retain) BaseLabel *label4;
@property (nonatomic, retain) BaseLabel *label5;
@property (nonatomic, retain) BaseLabel *label6;
@property (nonatomic, retain) BaseLabel *alabel1;
@property (nonatomic, retain) BaseLabel *alabel2;
@property (nonatomic, retain) BaseLabel *alabel3;
@property (nonatomic, retain) BaseLabel *alabel4;
@property (nonatomic, retain) BaseLabel *alabel5;
@property (nonatomic, retain) BaseLabel *alabel6;
@property (nonatomic, retain) BaseLabel *titleLabel;
@property (nonatomic, retain) UIView *lineView;

@end


@implementation CustomerServiceTableViewCell

- (void)dealloc
{
    [_backView release];
    [_label1 release];
    [_label2 release];
    [_label3 release];
    [_label4 release];
    [_label5 release];
    [_label6 release];
    [_alabel1 release];
    [_alabel2 release];
    [_alabel3 release];
    [_alabel4 release];
    [_alabel5 release];
    [_alabel6 release];
    [super dealloc];
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backView = [[BaseView alloc] init];
        //        self.backView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_backView];
        [_backView release];
        
        self.titleLabel = [[BaseLabel alloc] init];
        _titleLabel.text = @"客户服务";
        _titleLabel.font = [UIFont systemFontOfSize:15 * WIDTH];
        [self.backView addSubview:_titleLabel];
        [_titleLabel release];
        
        self.lineView = [[UIView alloc] init];
        _lineView.backgroundColor = [UIColor grayColor];
        [self.backView addSubview:_lineView];
        [_lineView release];
        
        self.label1 = [[BaseLabel alloc] init];
        _label1.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label1.textColor = [UIColor whiteColor];
        _label1.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label1.textAlignment = NSTextAlignmentCenter;
        _label1.text = @"客服电话";
        [self.backView addSubview:_label1];
        [_label1 release];
        
        self.label2 = [[BaseLabel alloc] init];
        _label2.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label2.textColor = [UIColor whiteColor];
        _label2.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label2.textAlignment = NSTextAlignmentCenter;
        _label2.text = @"客服时间";
        [self.backView addSubview:_label2];
        [_label2 release];
        
        self.label3 = [[BaseLabel alloc] init];
        _label3.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label3.textColor = [UIColor whiteColor];
        _label3.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label3.textAlignment = NSTextAlignmentCenter;
        _label3.text = @"发货时间";
        [self.backView addSubview:_label3];
        [_label3 release];
        
        self.label4 = [[BaseLabel alloc] init];
        _label4.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label4.textColor = [UIColor whiteColor];
        _label4.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label4.textAlignment = NSTextAlignmentCenter;
        _label4.text = @"配送服务";
        [self.backView addSubview:_label4];
        [_label4 release];
        
        self.label5 = [[BaseLabel alloc] init];
        _label5.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label5.textColor = [UIColor whiteColor];
        _label5.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label5.textAlignment = NSTextAlignmentCenter;
        _label5.text = @"相关服务";
        [self.backView addSubview:_label5];
        [_label5 release];
        
        self.label6 = [[BaseLabel alloc] init];
        _label6.backgroundColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _label6.textColor = [UIColor whiteColor];
        _label6.font = [UIFont systemFontOfSize:12 * WIDTH];
        _label6.textAlignment = NSTextAlignmentCenter;
        _label6.text = @"微信服务";
        [self.backView addSubview:_label6];
        [_label6 release];
        
        self.alabel1 = [[BaseLabel alloc] init];
        _alabel1.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel1.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel1.numberOfLines = 0;
        _alabel1.textAlignment = NSTextAlignmentLeft;
        _alabel1.text = @"400-0788-738";
        [self.backView addSubview:_alabel1];
        [_alabel1 release];
        
        self.alabel2 = [[BaseLabel alloc] init];
        _alabel2.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel2.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel2.numberOfLines = 0;
        _alabel2.textAlignment = NSTextAlignmentLeft;
        _alabel2.text = @"周一至周日09:00-22:00";
        [self.backView addSubview:_alabel2];
        [_alabel2 release];
        
        self.alabel3 = [[BaseLabel alloc] init];
        _alabel3.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel3.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel3.numberOfLines = 0;
        _alabel3.textAlignment = NSTextAlignmentLeft;
        _alabel3.text = @"周一至周日全天发货17点前付款当天发货";
        [self.backView addSubview:_alabel3];
        [_alabel3 release];
        
        self.alabel4 = [[BaseLabel alloc] init];
        _alabel4.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel4.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel4.numberOfLines = 0;
        _alabel4.textAlignment = NSTextAlignmentLeft;
        _alabel4.text = @"限大陆地区港澳台地区无法配送";
        [self.backView addSubview:_alabel4];
        [_alabel4 release];
        
        self.alabel5 = [[BaseLabel alloc] init];
        _alabel5.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel5.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel5.numberOfLines = 0;
        _alabel5.textAlignment = NSTextAlignmentLeft;
        _alabel5.text = @"请参阅我的订单可办理退货";
        [self.backView addSubview:_alabel5];
        [_alabel5 release];
        
        self.alabel6 = [[BaseLabel alloc] init];
        _alabel6.textColor = [UIColor colorWithWhite:0.098 alpha:1.000];
        _alabel6.font = [UIFont systemFontOfSize:13 * WIDTH];
        _alabel6.numberOfLines = 0;
        _alabel6.textAlignment = NSTextAlignmentLeft;
        _alabel6.text = @"微信号: ujipinweixin周一至周日09:00-22:00";
        [self.backView addSubview:_alabel6];
        [_alabel6 release];
        
        
        
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.backView.frame = CGRectMake(0, 10 * HEIGHT, self.contentView.frame.size.width, self.contentView.frame.size.height - 10 * HEIGHT);
    self.titleLabel.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 70 * WIDTH, 20 * HEIGHT);
    self.lineView.frame = CGRectMake(0, 35 * HEIGHT, self.contentView.frame.size.width, 1);
    self.label1.frame = CGRectMake(10 * WIDTH, 45 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.label2.frame = CGRectMake(10 * WIDTH, 65 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.label3.frame = CGRectMake(10 * WIDTH, 85 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.label4.frame = CGRectMake(10 * WIDTH, 105 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.label5.frame = CGRectMake(10 * WIDTH, 125 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.label6.frame = CGRectMake(10 * WIDTH, 145 * HEIGHT, 55 * WIDTH, 15 * HEIGHT);
    self.alabel1.frame = CGRectMake(70 * WIDTH, 45 * HEIGHT, self.contentView.frame.size.width - 75 * WIDTH, 15 * HEIGHT);
    self.alabel2.frame = CGRectMake(70 * WIDTH, 65 * HEIGHT, self.contentView.frame.size.width - 75 * WIDTH, 15 * HEIGHT);
    self.alabel3.frame = CGRectMake(70 * WIDTH, 85 * HEIGHT, self.contentView.frame.size.width - 75 * WIDTH, 15 * HEIGHT);
    self.alabel4.frame = CGRectMake(70 * WIDTH, 105 * HEIGHT, self.contentView.frame.size.width - 75 * WIDTH, 15 * HEIGHT);
    self.alabel5.frame = CGRectMake(70 * WIDTH, 125 * HEIGHT, self.contentView.frame.size.width - 75 * WIDTH, 15 * HEIGHT);
    self.alabel6.frame = CGRectMake(70  * WIDTH, 145 * HEIGHT, self.contentView.frame.size.width - 75  * WIDTH, 15 * HEIGHT);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
